home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
CMPLTPAS
/
PUSHPOP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-12-15
|
313b
|
23 lines
PROGRAM PushPop;
CONST
Levels = 5;
VAR
Depth : Integer;
PROCEDURE Dive(VAR Depth : Integer);
BEGIN
Writeln('Push!');
Writeln('Our depth is now: ',Depth);
Depth := Depth + 1;
IF Depth <= Levels THEN Dive(Depth);
Writeln('Pop!')
END;
BEGIN
Depth := 1;
Dive(Depth)
END.